<template>
	<div class="app-container">
		<el-form ref="finalResultRef" :model="form" :rules="rules" label-width="120px">
			<el-row :gutter="20">
				<el-col :span="21">
					<el-row>
						<el-col :span="24" class="tab-title">
							{{ form.taskName }}评估任务
						</el-col>
					</el-row>
					<el-row :gutter="20">
						<el-col :span="12">
							<el-form-item label="任务编号：" prop="taskNum">
								{{ form.taskNum }}
							</el-form-item>
						</el-col>
						<el-col :span="6">
							<el-form-item label="评估人：" prop="evaluateUserName">
								{{ form.evaluateUserName }}
							</el-form-item>
						</el-col>
					</el-row>
					<el-row :gutter="20">
						<el-col :span="12">
							<el-form-item label="灾害类型：">
								{{ form.disasterType }}
							</el-form-item>
						</el-col>
						<el-col :span="12">
							<el-form-item label="任务地区：">
								<el-tooltip popper-class="tool-tip" effect="light" :content="form.taskDistrict" placement="right-start">
									{{ form.taskDistrict }}
								</el-tooltip>
							</el-form-item>
						</el-col>
					</el-row>
					<el-row>
						<el-col :span="24" class="tab-title">
							数据版本选择
						</el-col>
					</el-row>
					<el-row :gutter="20">
						<el-col :span="12">
							<el-form-item label="坡度数据:">
								<el-button v-if="isSlopeShowButton" @click="selectSlope">选择</el-button>
								<el-link v-else type="primary" :underline="false" @click="selectSlope">{{ slopeVersion }}</el-link>
							</el-form-item>
						</el-col>
						<el-col :span="12">
							<el-form-item label="地层岩性:">
								<el-button v-if="isLithologyShowButton" @click="selectLithology">选择</el-button>
								<el-link v-else type="primary" :underline="false" @click="selectLithology">{{ lithologyVersion }}</el-link>
							</el-form-item>
						</el-col>
					</el-row>
					<el-row :gutter="20">
						<el-col :span="12">
							<el-form-item label="地貌数据:">
								<el-button v-if="isLandformsShowButton" @click="selectLandforms">选择</el-button>
								<el-link v-else type="primary" :underline="false" @click="selectLandforms">{{ landformsVersion }}</el-link>
							</el-form-item>
						</el-col>
						<el-col :span="12">
							<el-form-item label="天然密度数据:">
								<el-button v-if="isNatDenShowButton" @click="selectNatDenVersion">选择</el-button>
								<el-link v-else type="primary" :underline="false" @click="selectNatDenVersion">{{ natDenVersion }}</el-link>
							</el-form-item>
						</el-col>
					</el-row>
					<el-row :gutter="20">
						<el-col :span="12">
							<el-form-item label="地震动峰值加速度数据（50年超越概率2%）:" label-width="310px">
								<el-button v-if="isA1ShowButton" @click="selectPgaA1">选择</el-button>
								<el-link v-else type="primary" :underline="false" @click="selectPgaA1">{{ a1Version }}</el-link>
							</el-form-item>
						</el-col>
					</el-row>
					<el-row :gutter="20">
						<el-col :span="12">
							<el-form-item label="地震动峰值加速度数据（50年超越概率10%）:" label-width="310px">
								<el-button v-if="isA2ShowButton" @click="selectPgaA2">选择</el-button>
								<el-link v-else type="primary" :underline="false" @click="selectPgaA2">{{ a2Version }}</el-link>
							</el-form-item>
						</el-col>
					</el-row>
					<el-row :gutter="20">
						<el-col :span="12">
							<el-form-item label="地震动峰值加速度数据（50年超越概率63%）:" label-width="310px">
								<el-button v-if="isA3ShowButton" @click="selectPgaA3">选择</el-button>
								<el-link v-else type="primary" :underline="false" @click="selectPgaA3">{{ a3Version }}</el-link>
							</el-form-item>
						</el-col>
					</el-row>
					<el-row>
						<el-col :span="24" class="tab-title">
							黄土高原模型评估
							<el-button type="primary" size="small" @click="replaceModel" style="margin-left: 20px;">更换模型</el-button>
						</el-col>
						<!--<el-col :span="12">
							<el-link type="primary" :underline="false" @click="replaceModel">更换模型</el-link>
							
						</el-col>-->
					</el-row>
					<el-row>
						<el-col :span="20">
							<p>影响因子及权重系数修改：</p>
							<table align="center" style="width: 100%;border-collapse: collapse;">
								<tr>
									<td align="center">地震动峰值加速度（g）</td>
									<td align="center">地貌</td>
									<td align="center">地层时代</td>
									<td align="center">降雨量（mm）</td>
									<td align="center">坡度（°）</td>
									<td align="center">天然密度(g/m3)</td>
								</tr>
								<tr>
									<td align="center"><el-input v-model="aNum" /></td>
									<td align="center"><el-input v-model="phyNum" /></td>
									<td align="center"><el-input v-model="lithologyNum" /></td>
									<td align="center"><el-input v-model="climateNum" /></td>
									<td align="center"><el-input v-model="slopeNum" /></td>
									<td align="center"><el-input v-model="natDenNum" /></td>
								</tr>
							</table>
						</el-col>
					</el-row>
				</el-col>
				<el-col :span="3">
					<el-space direction="vertical" alignment="start">
						<el-button type="primary" @click="saveMiddleResult">存为中间结果</el-button>
						<el-button type="primary" v-if="!mapView" @click="calculation">评估计算</el-button>
						<el-button type="primary" v-else @click="calculation">重新评估计算</el-button>
						<el-button type="primary" plain class="success-btn-icon" v-if="mapView" @click="selectMapModel">
							<el-icon>
								<SuccessFilled />
							</el-icon>
							地图查看结果
						</el-button>
					</el-space>
				</el-col>
			</el-row>
		</el-form>

		<!-- 打开坡度数据选择对话框 -->
		<el-dialog :title="title" v-model="openSlope" width="1000px" append-to-body @close="cancel">
			<p></p>
			<el-form :model="queryParamsSel" ref="querySelRef" :inline="true" v-show="showSearch" label-width="120px">
				<el-form-item label="版本号" prop="versionCode">
					<el-input v-model="queryParamsSel.versionCode" clearable />
				</el-form-item>
				<el-form-item label="上传人" prop="uploadUser">
					<el-input v-model="queryParamsSel.uploadUser" clearable />
				</el-form-item>
				<el-form-item label="上传日期">
					<el-col :span="10">
						<el-date-picker type="date" placeholder="选择日期" v-model="queryParamsSel.uploadStartTime"
							style="width: 100%;" :disabled-date="startDisabledDate1"></el-date-picker>
					</el-col>
					<el-col class="line" :span="1">至</el-col>
					<el-col :span="10">
						<el-date-picker type="date" placeholder="选择日期" v-model="queryParamsSel.uploadEndTime"
							style="width: 100%;" :disabled-date="endDisabledDate1"></el-date-picker>
					</el-col>
				</el-form-item>
				<el-form-item>
					<el-button type="primary" icon="Search" @click="handleQuerySel">搜索</el-button>
					<el-button icon="Refresh" @click="resetQuerySel">重置</el-button>
				</el-form-item>
			</el-form>
			<el-table v-loading="loadingSel" ref="tableRef" :data="slopeDataList">
				<el-table-column type="expand" width="1">
					<template #default="props">
						<div class="expandTable">
							<h3>更多信息</h3>
							<p>数据名称: {{ props.row.dataName }}</p>
							<p>版本说明: {{ props.row.versionDesc }}（此处是版本说明，<span style="color:red">限制300字以内</span> ）</p>
							<p>数据说明: {{ props.row.dataDesc }}（此处是数据说明，<span style="color:red">限制300字以内</span> ）</p>
							<!--<p v-if="props.row.updateDesc">更新说明: {{ props.row.dataType }}</p>
            <p>使用系统: {{ props.row.useThisSystems }}
              <el-tooltip class="box-item" content="Right Center prompts info" placement="right">
                <el-tag>系统使用说明</el-tag>
              </el-tooltip>
            </p>
            <p>数据文件:
              <template v-for="item in props.row.dataFileList">
                <u style="color:#107ce5;cursor: pointer;" @click="handleDownload(item)">{{ item.name }}</u><br />
              </template>
            </p>
            <p>附件:
              <template v-for="item in props.row.attachmentList">
                <u style="color:#107ce5;cursor: pointer;" @click="handleDownload(item)">{{ item.name }}</u><br />
              </template>
            </p>-->
						</div>
					</template>
				</el-table-column>
				<el-table-column label="版本日期" align="center" prop="versionTime">
					<!--<template #default="scope">
						<el-button type="text" @click="edit(scope.row)">{{ scope.row.modelName }}
						</el-button>
					</template>-->
				</el-table-column>
				<el-table-column label="版本号" align="center" prop="versionCode" width="200" />
				<el-table-column label="版本级别（版本范围）" align="center" prop="dataRange" width="220" />
				<el-table-column label="上传日期" align="center" prop="uploadTime" />
				<el-table-column label="上传人" align="center" prop="uploadUser" />
				<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
					<template #default="scope">
						<el-button type="text" @click="handleMore(scope.row)">更多信息</el-button>
						<el-button type="text" @click="handleSelect(scope.row)">选择</el-button>
					</template>
				</el-table-column>
			</el-table>

			<pagination v-if="showPage == 'pd'" v-show="totalSel > 0" :total="totalSel" v-model:page="queryParamsSel.page"
				v-model:limit="queryParamsSel.rows" @pagination="getSlopeDataList(dataVersionType)" />
			<pagination v-else v-show="totalSel > 0" :total="totalSel" v-model:page="queryParamsSel.page"
				v-model:limit="queryParamsSel.rows" @pagination="getDataVersionList(dataVersionType)" />

			<template #footer>
				<div class="dialog-footer">
					<el-button @click="cancel">取 消</el-button>
				</div>
			</template>
		</el-dialog>
		<!-- 选择模型弹出框 -->
		<el-dialog v-model="selectDetail" title="选择模型" width="900px" append-to-body>
			<p></p>
			<el-tabs :tab-position="tabPosition" v-model="activeNameModel" @tab-click="handleClickModel">
				<el-tab-pane label="层次分析法模型" name="first">
					<el-row>
						<el-col :span="6" class="tab-title">
							模型描述
						</el-col>
					</el-row>
					<el-row>
						<el-col :span="22" :offset="1">
							<p style="text-indent: 2em;">
								层次分析法（Analytical Hierarchy
								Process，APH）是一种将定性分析和定量分析相结合的系统分析方法。它适用于多准则、多目标的复杂问题的决策分析，可以将决策者对复杂系统的决策思维过程实行数量化，为选出最优决策提供依据。
							</p>
						</el-col>
					</el-row>
					<el-row>
						<el-col :span="6" class="tab-title">
							具体步骤
						</el-col>
					</el-row>
					<el-row>
						<el-col :span="22" :offset="1">
							<p>
								1、建立层次结构模型：综合分析系统所涉及的目标、范围、准则，约束条件，确定综合评价体系中各因素之间的关系，并根据指标的隶属关系进行上下分层排列，形成危险性综合评价体系层次结构。将问题中的各个要素划分为不同的层次结构，以框架结构说明各层次之间的从属关系。
							</p>
							<p>2、构建判断矩阵：分析每一层的因素相对于上一层次某因素的单排序情况，对一系列成对因素进行量化判断比较，并写成矩阵形式，构成判断矩阵。</p>
							<p>3、归一化权重的计算以及判断矩阵的一致性检验：对上述判断矩阵进行计算，得出矩阵的最大特征值以及相对应的特征向量，将得到的特征向量进行归一化处理后得到归一化权重，对判断矩阵进行一致性检验，以确保组合排序的可靠性。
							</p>
							<p>4、评价单元危险性指数：根据各判断矩阵矩阵所计算的归一化权重，利用多因子加权叠加方法，分别计算各评价单元危险性指数。</p>
						</el-col>
					</el-row>
					<el-row>
						<el-col :span="6" class="tab-title">
							数据使用
						</el-col>
					</el-row>
					<el-row>
						<el-col :span="22" :offset="1">
							<p>
								所需数据包括坡度、地层岩性（或工程地质岩组归并结果）、活断层、道路、水系、气候、地震动峰值加速度。
							</p>
						</el-col>
					</el-row>
				</el-tab-pane>
				<el-tab-pane label="指数模型" name="second">
					<el-row>
						<el-col :span="6" class="tab-title">
							模型描述
						</el-col>
					</el-row>
					<el-row>
						<el-col :span="22" :offset="1">
							<p style="text-indent: 2em;">
								滑坡危险性评价指数模型是指基于坡度和烈度因子与地震滑坡密度关系，针对不同坡度段以指数函数的形式建立模型，拟合滑坡密度，用以评估地震滑坡危险性的方法。
							</p>
						</el-col>
					</el-row>
					<el-row>
						<el-col :span="6" class="tab-title">
							算法公式
						</el-col>
					</el-row>
					<el-row>
						<el-col :span="22" :offset="1">
							<p>
								1、将坡度分为≤1°、1° ～ 3°、3° ～ 7°、7° ～ 10°、10° ～ 15°、15° ～ 20°、20° ～ 25°、25° ～ 30°、30° ～ 35°、35° ～ 40°、40° ～
								45°、45° ～ 50°、 ＞ 50°共 13 个等级。
							</p>
							<p>2、利用指数模型分别计算任务区域不同烈度条件下，不同坡度范围内，滑坡密度。</p>
							<p>3、按照地震滑坡密度等级划分，对任务区滑坡危险性进行综合评价。</p>
							<p>不同坡度下的地震滑坡密度指数模型：</p>
							<table align="center" style="width: 100%;border-collapse: collapse;">
								<tr>
									<td align="center">坡度范围</td>
									<td align="center" colspan="2">指数模型</td>
								</tr>
								<tr>
									<td align="center">≤1°</td>
									<td align="center">y=2E-10e<sup>1.5508x</sup></td>
									<td align="center">R<sup>2</sup>=0.1664</td>
								</tr>
								<tr>
									<td align="center">1°-3°</td>
									<td align="center">y=2E-07e<sup>1.2596x</sup></td>
									<td align="center">R<sup>2</sup>=0.9439</td>
								</tr>
								<tr>
									<td align="center">3°-7°</td>
									<td align="center">y=3E-07e<sup>1.2683x</sup></td>
									<td align="center">R<sup>2</sup>=0.9684</td>
								</tr>
								<tr>
									<td align="center">7°-10°</td>
									<td align="center">y=1E-06e<sup>1.1574x</sup></td>
									<td align="center">R<sup>2</sup>=0.9555</td>
								</tr>
								<tr>
									<td align="center">10°-15°</td>
									<td align="center">y=2E-06e<sup>1.1368x</sup></td>
									<td align="center">R<sup>2</sup>=0.9525</td>
								</tr>
								<tr>
									<td align="center">15°-20°</td>
									<td align="center">y=3E-06e<sup>1.0869x</sup></td>
									<td align="center">R<sup>2</sup>=0.9524</td>
								</tr>
								<tr>
									<td align="center">20°-25°</td>
									<td align="center">y=6E-06e<sup>1.0558x</sup></td>
									<td align="center">R<sup>2</sup>=0.9406</td>
								</tr>
								<tr>
									<td align="center">25°-30°</td>
									<td align="center">y=1E-05e<sup>1.013x</sup></td>
									<td align="center">R<sup>2</sup>=0.952</td>
								</tr>
								<tr>
									<td align="center">30°-35°</td>
									<td align="center">y=2E-05e<sup>0.9709x</sup></td>
									<td align="center">R<sup>2</sup>=0.9518</td>
								</tr>
								<tr>
									<td align="center">35°-40°</td>
									<td align="center">y=4E-05e<sup>0.9081x</sup></td>
									<td align="center">R<sup>2</sup>=0.9617</td>
								</tr>
								<tr>
									<td align="center">40°-45°</td>
									<td align="center">y=6E-05e<sup>0.8946x</sup></td>
									<td align="center">R<sup>2</sup>=0.9497</td>
								</tr>
								<tr>
									<td align="center">45°-50°</td>
									<td align="center">y=9E-05e<sup>0.8621x</sup></td>
									<td align="center">R<sup>2</sup>=0.9388</td>
								</tr>
								<tr>
									<td align="center">>50°</td>
									<td align="center">y=3E-05e<sup>0.9743x</sup></td>
									<td align="center">R<sup>2</sup>=0.9071</td>
								</tr>
							</table>

							<p>地震滑坡危险等级划分：</p>
							<table align="center" style="width: 100%;border-collapse: collapse;">
								<tr>
									<td align="center" width="50px">序号</td>
									<td align="center" width="80px">地震滑坡危险等级</td>
									<td align="center" width="80px">综合评价</td>
									<td align="center" width="80px">滑坡密度值范围</td>
									<td align="center">滑坡现象</td>
								</tr>
								<tr>
									<td align="center">1</td>
									<td align="center">一级</td>
									<td align="center">几无</td>
									<td align="center">（0-0.01]</td>
									<td align="center">无滑坡现象</td>
								</tr>
								<tr>
									<td align="center">2</td>
									<td align="center">二级</td>
									<td align="center">轻微</td>
									<td align="center">（0.01-0.03]</td>
									<td>有些零星的落石、塌方现象，个别地方可能造成短暂的交通破坏，地震滑坡造成人畜伤亡的可能性很低，地震滑坡影响的道路、河流、电力、通信等设施在简易处置后可以很快恢复使用。</td>
								</tr>
								<tr>
									<td align="center">3</td>
									<td align="center">三级</td>
									<td align="center">中等</td>
									<td align="center">（0.03-0.09]</td>
									<td>有可能造成交通破坏和房屋受损，有出现地震滑坡造成人畜伤亡的可能，受地震滑坡影响的道路、河流、生命线工程等可以快速抢诵通常情况下1天内能大部分恢复使用。</td>
								</tr>
								<tr>
									<td align="center">4</td>
									<td align="center">四级</td>
									<td align="center">严重</td>
									<td align="center">（0.09-0.27]</td>
									<td>
										造成严重的交通中断断、房屋受损的较大可能性，甚至出现滑坡造成大量人员死亡的可能，受地震滑坡影响，可能需要数天的抢修才好基本恢复交通，在降水丰富和河流密集地区出现地震滑坡一堰塞湖、地震滑坡一泥石流等次生灾害链的可能性也较大，有关部门应该根据地震影响区域人口密度等因素考虑是否提高启动的应急响应等级。
									</td>
								</tr>
								<tr>
									<td align="center">5</td>
									<td align="center">五级</td>
									<td align="center">特重</td>
									<td align="center">大于0.27</td>
									<td>可能造成特别严重的交通中断、房屋受损和人员伤亡，在降水丰富和河流密集地区出现地震滑坡一堰塞湖、地震滑坡一泥石流等次生灾害链的可能性特别大，地震滑坡造成的
										交通、河流、电力、通信等破坏往往需要十余天甚至数十天才能修复，有关部门应该考虑提高启动的应急响应等级。</td>
								</tr>
							</table>
						</el-col>
					</el-row>
					<el-row>
						<el-col :span="6" class="tab-title">
							数据使用
						</el-col>
					</el-row>
					<el-row>
						<el-col :span="22" :offset="1">
							<p>
								所需数据为坡度。
							</p>
						</el-col>
					</el-row>
				</el-tab-pane>
				<el-tab-pane label="逻辑斯蒂模型" name="third">
					<el-row>
						<el-col :span="6" class="tab-title">
							模型描述
						</el-col>
					</el-row>
					<el-row>
						<el-col :span="22" :offset="1">
							<p style="text-indent: 2em;">
								逻辑斯蒂模型是指基于坡度和烈度因子与地震滑坡密度关系，针对不同坡度段以逻辑斯蒂函数建立模型，拟合滑坡密度，用以评估地震滑坡危险性的方法。
							</p>
						</el-col>
					</el-row>
					<el-row>
						<el-col :span="6" class="tab-title">
							算法公式
						</el-col>
					</el-row>
					<el-row>
						<el-col :span="22" :offset="1">
							<p>
								1、将坡度分为≤1°、1° ～ 3°、3° ～ 7°、7° ～ 10°、10° ～ 15°、15° ～ 20°、20° ～ 25°、25° ～ 30°、30° ～ 35°、35° ～ 40°、40° ～
								45°、45° ～ 50°、 ＞ 50°共 13 个等级。
							</p>
							<p>2、利用逻辑斯蒂模型分别计算任务区域不同烈度条件下，不同坡度范围内，滑坡密度。</p>
							<p>3、按照地震滑坡密度等级划分，对任务区滑坡危险性进行综合评价。</p>
							<p>不同坡度下的地震滑坡密度逻辑斯蒂模型：</p>
							<table align="center" style="width: 100%;border-collapse: collapse;">
								<tr>
									<td align="center">坡度范围</td>
									<td align="center" colspan="2">逻辑斯蒂模型</td>
								</tr>
								<tr>
									<td align="center">≤1°</td>
									<td align="center">Y=1/(1+exp(8.22178-0.34329x))</td>
									<td align="center">OR=1.409577</td>
								</tr>
								<tr>
									<td align="center">1°-3°</td>
									<td align="center">Y=1/(1+exp(9.27905-0.63448x))</td>
									<td align="center">OR=1.884096</td>
								</tr>
								<tr>
									<td align="center">3°-7°</td>
									<td align="center">Y=1/(1+exp(11.3983-0.916239x))</td>
									<td align="center">OR=2.499872</td>
								</tr>
								<tr>
									<td align="center">7°-10°</td>
									<td align="center">Y=1/(1+exp(10.6025-0.849128x))</td>
									<td align="center">OR=2.337608</td>
								</tr>
								<tr>
									<td align="center">10°-15°</td>
									<td align="center">Y=1/(1+exp(10.3517-0.852482x))</td>
									<td align="center">OR=2.345462</td>
								</tr>
								<tr>
									<td align="center">15°-20°</td>
									<td align="center">Y=1/(1+exp(10.0078-0.847624x))</td>
									<td align="center">OR=2.334094</td>
								</tr>
								<tr>
									<td align="center">20°-25°</td>
									<td align="center">Y=1/(1+exp(9.19721-0.789875x))</td>
									<td align="center">OR=2.203122</td>
								</tr>
								<tr>
									<td align="center">25°-30°</td>
									<td align="center">Y=1/(1+exp(9.68142-0.852073x))</td>
									<td align="center">OR=2344501</td>
								</tr>
								<tr>
									<td align="center">30°-35°</td>
									<td align="center">Y=1/(1+exp(9.65106-0.8847x))</td>
									<td align="center">OR=2.422259</td>
								</tr>
								<tr>
									<td align="center">35°-40°</td>
									<td align="center">Y=1/(1+exp(101154-0.968573x))</td>
									<td align="center">OR=2.634182</td>
								</tr>
								<tr>
									<td align="center">40°-45°</td>
									<td align="center">Y=1/(1+exp(10.1773-1.012792x))</td>
									<td align="center">OR=2.753278</td>
								</tr>
								<tr>
									<td align="center">45°-50°</td>
									<td align="center">Y=1/(1+exp(9.89683-1.007739x))</td>
									<td align="center">OR=2.939400</td>
								</tr>
								<tr>
									<td align="center">＞50°</td>
									<td align="center">Y=1/(1+exp(9.80003-0.989653x))</td>
									<td align="center">OR=2.690301</td>
								</tr>
							</table>

							<p>地震滑坡危险等级划分：</p>
							<table align="center" style="width: 100%;border-collapse: collapse;">
								<tr>
									<td align="center" width="50px">序号</td>
									<td align="center" width="80px">地震滑坡危险等级</td>
									<td align="center" width="80px">综合评价</td>
									<td align="center" width="80px">滑坡密度值范围</td>
									<td align="center">滑坡现象</td>
								</tr>
								<tr>
									<td align="center">1</td>
									<td align="center">一级</td>
									<td align="center">几无</td>
									<td align="center">（0-0.01]</td>
									<td align="center">无滑坡现象</td>
								</tr>
								<tr>
									<td align="center">2</td>
									<td align="center">二级</td>
									<td align="center">轻微</td>
									<td align="center">（0.01-0.03]</td>
									<td>有些零星的落石、塌方现象，个别地方可能造成短暂的交通破坏，地震滑坡造成人畜伤亡的可能性很低，地震滑坡影响的道路、河流、电力、通信等设施在简易处置后可以很快恢复使用。</td>
								</tr>
								<tr>
									<td align="center">3</td>
									<td align="center">三级</td>
									<td align="center">中等</td>
									<td align="center">（0.03-0.09]</td>
									<td>有可能造成交通破坏和房屋受损，有出现地震滑坡造成人畜伤亡的可能，受地震滑坡影响的道路、河流、生命线工程等可以快速抢诵通常情况下1天内能大部分恢复使用。</td>
								</tr>
								<tr>
									<td align="center">4</td>
									<td align="center">四级</td>
									<td align="center">严重</td>
									<td align="center">（0.09-0.27]</td>
									<td>
										造成严重的交通中断断、房屋受损的较大可能性，甚至出现滑坡造成大量人员死亡的可能，受地震滑坡影响，可能需要数天的抢修才好基本恢复交通，在降水丰富和河流密集地区出现地震滑坡一堰塞湖、地震滑坡一泥石流等次生灾害链的可能性也较大，有关部门应该根据地震影响区域人口密度等因素考虑是否提高启动的应急响应等级。
									</td>
								</tr>
								<tr>
									<td align="center">5</td>
									<td align="center">五级</td>
									<td align="center">特重</td>
									<td align="center">大于0.27</td>
									<td>可能造成特别严重的交通中断、房屋受损和人员伤亡，在降水丰富和河流密集地区出现地震滑坡一堰塞湖、地震滑坡一泥石流等次生灾害链的可能性特别大，地震滑坡造成的
										交通、河流、电力、通信等破坏往往需要十余天甚至数十天才能修复，有关部门应该考虑提高启动的应急响应等级。</td>
								</tr>
							</table>
						</el-col>
					</el-row>
					<el-row>
						<el-col :span="6" class="tab-title">
							数据使用
						</el-col>
					</el-row>
					<el-row>
						<el-col :span="22" :offset="1">
							<p>
								所需数据为坡度。
							</p>
						</el-col>
					</el-row>
				</el-tab-pane>
				<el-tab-pane label="黄土高原模型" name="fourth">
					<el-row>
						<el-col :span="6" class="tab-title">
							模型描述
						</el-col>
					</el-row>
					<el-row>
						<el-col :span="22" :offset="1">
							<p style="text-indent: 2em;">
								黄土高原模型适用于黄土高原地区地震滑坡危险性评估，该模型是利用层次分析法（AHP）确定各影响因子权重，对各因子进行分级赋值、加权叠加分析，进而建立黄土滑坡指数模型，用以评价不同超越概率下黄土发育地区地震滑坡危险性。
							</p>
						</el-col>
					</el-row>
					<el-row>
						<el-col :span="6" class="tab-title">
							算法公式
						</el-col>
					</el-row>
					<el-row>
						<el-col :span="22" :offset="1">
							<p>
								滑坡指数=a×地震动因子+b×地貌因子+c×地层时代因子+d×降雨量因子+e×天然密度因子+f×坡度因子其中：a、b、c、d、e、f为各影响因子权重系数。各影响因子赋值见表。
							</p>
							<p>1、用AHP方法计算权重系数，黄土高原滑坡区划的影响因子及权重系数如下：</p>
							<table align="center" style="width: 100%;border-collapse: collapse;">
								<tr>
									<td align="center">地震动峰值加速度(g)</td>
									<td align="center">地貌</td>
									<td align="center">地层时代</td>
									<td align="center">降雨量(mm)</td>
									<td align="center">坡度(°)</td>
									<td align="center">天然密度(g/m3)</td>
								</tr>
								<tr>
									<td align="center">0.3834</td>
									<td align="center">0.2734</td>
									<td align="center">0.0599</td>
									<td align="center">0.0878</td>
									<td align="center">0.1543</td>
									<td align="center">0.0412</td>
								</tr>

							</table>

							<p>2、根据影响因子赋值表来进行因子加权叠加分析，生成滑坡指数图：</p>
							<table align="center" style="width: 100%;border-collapse: collapse;">
								<tr>
									<td align="center">影响因子</td>
									<td align="center">分类</td>
									<td align="center">赋值</td>
								</tr>
								<tr>
									<td align="center" rowspan="6">地震动峰值加速度(g)</td>
									<td align="center">≥0.6</td>
									<td align="center">6</td>
								</tr>
								<tr>
									<td align="center">[0.4,0.6)</td>
									<td align="center">5</td>
								</tr>
								<tr>
									<td align="center">[0.25,0.4)</td>
									<td align="center">4</td>
								</tr>
								<tr>
									<td align="center">[0.15,0.25)</td>
									<td align="center">3</td>
								</tr>
								<tr>
									<td align="center">[0.05,0.15)</td>
									<td align="center">2</td>
								</tr>
								<tr>
									<td align="center">＜0.15</td>
									<td align="center">1</td>
								</tr>
								<tr>
									<td align="center" rowspan="2">地貌</td>
									<td align="center">源、阶地</td>
									<td align="center">1</td>
								</tr>
								<tr>
									<td align="center">梁、峁</td>
									<td align="center">4</td>
								</tr>
								<tr>
									<td align="center" rowspan="3">地层时代</td>
									<td align="center">Q3、 Q4</td>
									<td align="center">5</td>
								</tr>
								<tr>
									<td align="center">Q2</td>
									<td align="center">3</td>
								</tr>
								<tr>
									<td align="center">Q1</td>
									<td align="center">1</td>
								</tr>
								<tr>
									<td align="center" rowspan="6">降雨量(mm)</td>
									<td align="center">≥600</td>
									<td align="center">6</td>
								</tr>
								<tr>
									<td align="center">[500,600)</td>
									<td align="center">5</td>
								</tr>
								<tr>
									<td align="center">[400,500)</td>
									<td align="center">4</td>
								</tr>
								<tr>
									<td align="center">[300,400)</td>
									<td align="center">3</td>
								</tr>
								<tr>
									<td align="center">[200,300)</td>
									<td align="center">2</td>
								</tr>
								<tr>
									<td align="center">＜200</td>
									<td align="center">1</td>
								</tr>
								<tr>
									<td align="center" rowspan="6">坡度(°)</td>
									<td align="center">≥30</td>
									<td align="center">6</td>
								</tr>
								<tr>
									<td align="center">[24,30)</td>
									<td align="center">5</td>
								</tr>
								<tr>
									<td align="center">[18,24)</td>
									<td align="center">4</td>
								</tr>
								<tr>
									<td align="center">[12,18)</td>
									<td align="center">3</td>
								</tr>
								<tr>
									<td align="center">[5,12)</td>
									<td align="center">2</td>
								</tr>
								<tr>
									<td align="center">＜5</td>
									<td align="center">1</td>
								</tr>
								<tr>
									<td align="center" rowspan="6">天然密度(g/m3)</td>
									<td align="center">＜1.4</td>
									<td align="center">6</td>
								</tr>
								<tr>
									<td align="center">[1.4,1.5)</td>
									<td align="center">5</td>
								</tr>
								<tr>
									<td align="center">[1.5,1.6)</td>
									<td align="center">4</td>
								</tr>
								<tr>
									<td align="center">[1.6,1.7)</td>
									<td align="center">3</td>
								</tr>
								<tr>
									<td align="center">[1.7,1.8)</td>
									<td align="center">2</td>
								</tr>
								<tr>
									<td align="center">≥1.8</td>
									<td align="center">1</td>
								</tr>
							</table>
						</el-col>
					</el-row>
					<el-row>
						<el-col :span="6" class="tab-title">
							数据使用
						</el-col>
					</el-row>
					<el-row>
						<el-col :span="22" :offset="1">
							<p>
								所需数据包括坡度、地层岩性、地貌、天然密度、气候、地震动峰值加速度。
							</p>
						</el-col>
					</el-row>
				</el-tab-pane>
				<el-tab-pane label="Newmark模型" name="fifth">
					<el-row>
						<el-col :span="6" class="tab-title">
							模型描述
						</el-col>
					</el-row>
					<el-row>
						<el-col :span="22" :offset="1">
							<p style="text-indent: 2em;">
								Newmark模型是基于有限滑动位移模型，通过计算滑体在地震动加速度作用过程中累积的永久位移来评价斜坡稳定性的方法。
							</p>
						</el-col>
					</el-row>
					<el-row>
						<el-col :span="6" class="tab-title">
							算法公式
						</el-col>
					</el-row>
					<el-row>
						<el-col :span="22" :offset="1">
							<p style="text-indent: 2em;">
								Newmark 位移的区域危险性评估主要包括：
							</p>
							<p>（1）斜坡稳定系数 Fs计算：通过斜坡几何属性和岩土体属性，计算坡体的稳定系数 Fs：</p>
							<img style="margin-left: 100px;" src="@/assets/images/u4393.png">
							<!--<p><span style="font-size: 16px;font-weight: bold;">Fs = <sub style="position: absolute;top: 72px;left: 80px;">c´</sub>————<sup style="position: absolute;top: 95px;left: 80px;">γ t sinα</sup>
								+
							</span></p>-->
							<p><img style="margin-left: 10px;vertical-align: middle;" src="@/assets/images/u4369.png">
								为常数：<img style="vertical-align: middle;" src="@/assets/images/u4413.png"> ，t为常数，根据坡度不同取值不同，见下表，m值为用户输入的参数。
							</p>
							<table align="center" style="width: 100%;border-collapse: collapse;">
								<tr>
									<td align="center">坡度（°）</td>
									<td align="center">岩土体厚度（m）</td>
								</tr>
								<tr>
									<td align="center">&lt;30</td>
									<td align="center">5</td>
								</tr>
								<tr>
									<td align="center">30~45</td>
									<td align="center">4</td>
								</tr>
								<tr>
									<td align="center">45~60</td>
									<td align="center">3</td>
								</tr>
								<tr>
									<td align="center">&gt;60</td>
									<td align="center">2</td>
								</tr>
							</table>
							<!-- <p><img  src="@/assets/images/u4370.png"></p> -->
							<p>有效内聚力<img style="vertical-align: middle;" src="@/assets/images/u4373.png">
								，内摩擦角<img style="vertical-align: middle;" src="@/assets/images/u4374.png">
								，岩土体重度<img style="vertical-align: middle;" src="@/assets/images/u4375.png">
								，根据区域范围内基础数据地层岩性进行工程地质岩组归类后输入分组后每组（坚硬岩组、较硬岩组、较软岩组、软岩组、极软岩组）岩性对应的有效内聚力
								<img style="vertical-align: middle;" src="@/assets/images/u4373.png">
								，内摩擦角<img style="vertical-align: middle;" src="@/assets/images/u4374.png">
								值，岩土体重度<img style="vertical-align: middle;" src="@/assets/images/u4375.png">。
							</p>
							<p>2、临界加速度<img style="vertical-align: middle;" src="@/assets/images/u4381.png">
								计算：利用无限斜坡法计算稳定系数 Fs 间接推导得到临界加速度<img style="vertical-align: middle;" src="@/assets/images/u4381.png">。</p>
							<p><img style="margin-left: 100px;" src="@/assets/images/u4383.png"></p>
							<p>其中，g为重力加速度，α滑动面倾角，在式中近似按斜坡坡角（坡度）取值。</p>
							<p>3、Newmark累计位移计算：把临界加速度比作为回归方程变量进行地震边坡永久位移计算。</p>
							<p style="margin-left: 20px;">公式1：<img style="margin-left: 10px;vertical-align: middle;"
									src="@/assets/images/u4386.png"></p>
							<p style="margin-left: 20px;">公式2：<img style="margin-left: 10px;vertical-align: middle;"
									src="@/assets/images/u4389.png"></p>
							<p style="margin-left: 20px;">公式3：<img style="margin-left: 10px;vertical-align: middle;"
									src="@/assets/images/u4391.png"></p>
							<p>4、地震滑坡危险性评估：基于 Newmark 位移图基础之上，利用边坡失稳概率函数进行计算，从而得到评估区滑坡危险性指数分布图。</p>
							<p><img style="margin-left: 100px;" src="@/assets/images/u4392.png"></p>
						</el-col>
					</el-row>
					<el-row>
						<el-col :span="6" class="tab-title">
							数据使用
						</el-col>
					</el-row>
					<el-row>
						<el-col :span="22" :offset="1">
							<p>
								所需数据包括坡度、地层岩性（或工程地质岩组归并结果）、地震动峰值加速度。
							</p>
						</el-col>
					</el-row>
				</el-tab-pane>
			</el-tabs>
			<template #footer>
				<span class="dialog-footer">
					<el-button type="primary" @click="selectModel">选 择</el-button>
				</span>
			</template>
		</el-dialog>
	</div>
</template>

<script setup name="loessPlateauForm">
import { getTaskModelDetail, saveAsMiddleResult, getSlopeData, getParam1Version, delDzzhTaskModel, count4, saveTaskModel } from "@/api/slideAssess/loessPlateau";
import { ElLoading } from 'element-plus'

const route = useRoute();
const router = useRouter();
const openSlope = ref(false);
const { proxy } = getCurrentInstance();
const tabPosition = ref("left");
const activeNameModel = ref("first");
const modelName = ref("first");
const modelLabel = ref("");
const isSlopeShowButton = ref(true);
const isLithologyShowButton = ref(true);
const isLandformsShowButton = ref(true);
const isNatDenShowButton = ref(true);
const isA1ShowButton = ref(true);
const isA2ShowButton = ref(true);
const isA3ShowButton = ref(true);
const slopeVersion = ref("");
const lithologyVersion = ref("");
const landformsVersion = ref("");
const natDenVersion = ref("");
const a1Version = ref("");
const a2Version = ref("");
const a3Version = ref("");
const aNum = ref("0.3834");
const phyNum = ref("0.2734");
const lithologyNum = ref("0.0599");
const climateNum = ref("0.0878");
const slopeNum = ref("0.1543");
const natDenNum = ref("0.0412");
const selectDetail = ref(false);
const mapView = ref(false);
const showSearch = ref(true);
const title = ref("");
const slopeDataList = ref([]);
const totalSel = ref(0);
const loadingSel = ref(true);
const showPage = ref("pd");

// 保留三位小数
const positive3decimals = (rule, value, callback) => {
	value = String(value)
	if (isNaN(value) || !value) {
		return callback(new Error());
	}
	var re = /^([0-9]+[\d]*(.[0-9]{3}))$/;
	if (!re.test(value)) {
		callback(new Error());
	} else {
		callback();
	}
}

// 保留两位小数
const positive2decimals = (rule, value, callback) => {
	value = String(value)
	if (isNaN(value) || !value) {
		return callback(new Error());
	}
	var re = /^([0-9]+[\d]*(.[0-9]{2}))$/;
	if (!re.test(value)) {
		callback(new Error());
	} else {
		callback();
	}
}

// (0,10]整数
const positive0_10integer = (rule, value, callback) => {
	value = String(value)
	if (isNaN(value) || !value) {
		return callback(new Error());
	}
	var re = /^([1-9]|10)$/;
	if (!re.test(value)) {
		callback(new Error());
	} else {
		callback();
	}
}

// [3,5]整数
const positive3_5integer = (rule, value, callback) => {
	value = String(value)
	if (isNaN(value) || !value) {
		return callback(new Error());
	}
	var re = /^([3-5])$/;
	if (!re.test(value)) {
		callback(new Error());
	} else {
		callback();
	}
}
const data = reactive({
	form: {},
	queryParams: {
		page: 1,
		rows: 10,
		province: null,
		city: null,
	},
	queryParamsSel: {
		page: 1,
		rows: 10,
	},
	rules: {
		taskCode: [{ required: true, message: "任务编号不能为空", trigger: "blur" }],
		modelName: [{ required: true, message: "模型名称不能为空", trigger: "blur" }],
		province: [{ required: true, message: "省不能为空", trigger: "blur" }],
		provinceId: [{ required: true, message: "省不能为空", trigger: "change" }],
		city: [{ required: true, message: "市不能为空", trigger: "change" }],
		cityId: [{ required: false, message: "市不能为空", trigger: "change" }],
		area: [{ required: true, message: "区/县不能为空", trigger: "blur" }],
		areaId: [{ required: true, message: "区/县 不能为空", trigger: "blur" }],
		smrsNumber1: [{ required: true, message: "保留三位小数", trigger: "blur", validator: positive3decimals }],
		smrsNumber2: [{ required: true, message: "保留两位小数", trigger: "blur", validator: positive2decimals }],
		deathNumber: [{ required: true, message: "（0,10]之间的整数数", trigger: "blur", validator: positive0_10integer }],
		injuries: [{ required: true, message: "[3,5]之间的整数", trigger: "blur", validator: positive3_5integer }]
	}
});

const { queryParams, queryParamsSel, form, rules } = toRefs(data);

const startDisabledDate1 = (time) => {
  if (queryParamsSel.value.uploadEndTime) {
    return time.getTime() > new Date(queryParamsSel.value.uploadEndTime).getTime();
  }
  return false;
};
const endDisabledDate1 = (time) => {
  if (queryParamsSel.value.uploadStartTime) {
    return time.getTime() < new Date(queryParamsSel.value.uploadStartTime).getTime();
  }
  return false;
};

// 监听开始时间和结束时间的变化，更新对应的 disabledDate 函数
watch(queryParamsSel.value.uploadStartTime, (newVal) => {
  // 当开始时间改变时，更新结束时间的选择范围
  endDisabledDate1(newVal);
});

watch(queryParamsSel.value.uploadEndTime, (newVal) => {
  // 当结束时间改变时，更新开始时间的选择范围
  startDisabledDate1(newVal);
});

/** 获取模型详情 */
function getTaskModel() {
	const { taskId, modelType, dtmId } = route.query
	let params = { taskId, modelType, dtmId }
	const loading = ElLoading.service({
		lock: true,
		text: '加载中...',
		background: 'rgba(0, 0, 0, 0.7)',
	})
	getTaskModelDetail(params).then(response => {
		form.value = response.data;
		if (form.value.slopeVersion) {
			isSlopeShowButton.value = false;
			slopeVersion.value = form.value.slopeVersion;
		}
		if (form.value.lithologyVersion) {
			isLithologyShowButton.value = false;
			lithologyVersion.value = form.value.lithologyVersion;
		}
		if (form.value.phyVersion) {
			isLandformsShowButton.value = false;
			landformsVersion.value = form.value.phyVersion;
		}
		if (form.value.natDenVersion) {
			isNatDenShowButton.value = false;
			natDenVersion.value = form.value.natDenVersion;
		}
		if (form.value.a1Version) {
			isA1ShowButton.value = false;
			a1Version.value = form.value.a1Version;
		}
		if (form.value.a2Version) {
			isA2ShowButton.value = false;
			a2Version.value = form.value.a2Version;
		}
		if (form.value.a3Version) {
			isA3ShowButton.value = false;
			a3Version.value = form.value.a3Version;
		}
		if (form.value.status == "1") {
			mapView.value = true;
		}
		if (form.value.disasterType !== null && form.value.disasterType !== "") {
			var disasterTypeArr = form.value.disasterType.split(',');
			var newArr = [];
			disasterTypeArr.forEach((item) => {
				newArr.push(transformDisasterType(item))
			});
		}
		form.value.disasterType = newArr.join(",")
		loading.close()
	}).catch(() => loading.close())
}
function selectMapModel() {
	//评估结果地图
	let pga = []
	a1Version.value && pga.push('a1')
	a2Version.value && pga.push('a2')
	a3Version.value && pga.push('a3')
	router.push({
		path: "/analysisAssess/indexModelMapSelect",
		query: {
			taskId: route.query.taskId,
			taskDistrict: 'row.taskDistrict',
			modelType: '黄土高原模型',
			metaTitle: "评估结果查看",
			pga
		}
	})
}
function transformDisasterType(value) {
	if (value == "1") {
		return "地震滑坡";
	} else if (value == "2") {
		return "砂土液化";
	} else if (value == "3") {
		return "软土震陷";
	}
}
// 取消按钮
function cancel() {
	resetQuerySelForm();
	openSlope.value = false;
}
const resetQuerySelForm = () => {
	proxy.resetForm("querySelRef");
	queryParamsSel.value = {
		uploadStartTime: '',
		uploadEndTime: '',
		page: 1,
		rows: 10
	};
}
//存为中间结果
function saveMiddleResult() {
	if (form.value.status == "2") {
		proxy.$modal.msgWarning("请点击【评估计算】后再保存中间结果。");
		return
	}
	saveAsMiddleResult({ "dtmId": form.value.dtmId, "taskId": route.query.taskId }).then(response => {
		proxy.$modal.msgSuccess(response.message);
	});
}
//评估计算
function calculation() {
	const loading = ElLoading.service({
		lock: true,
		text: '计算中...',
		background: 'rgba(0, 0, 0, 0.7)',
	})
	count4({
		"slopeVersion": slopeVersion.value,
		"lithologyVersion": lithologyVersion.value,
		"phyVersion": landformsVersion.value,
		"natDenVersion": natDenVersion.value,
		"a1Version": a1Version.value,
		"a2Version": a2Version.value,
		"a3Version": a3Version.value,
		"slopeNum": slopeNum.value,//坡度数据的因子
		"lithologyNum": lithologyNum.value,//地层时代的因子
		"phyNum": phyNum.value,//地貌的因子
		"climateNum": climateNum.value,//降雨量的因子
		"natDenNum": natDenNum.value,//天然密度的因子
		"avNum": aNum.value,
		"taskId": route.query.taskId
	}).then(response => {
		mapView.value = true;
		getTaskModel();
		loading.close()
		proxy.$modal.msgSuccess(response.message);
	}).catch(() => {
		loading.close()
	});
}
//选择模型
function selectModel() {
	if (modelName.value == "first") {
		//层次分析法模型			
		router.push({
			path: "/analysisAssess/levelAnalyse",
			query: {
				taskId: route.query.taskId,
				modelType: "1",
				taskDistrict: route.query.taskDistrict,
				metaTitle: modelLabel.value
			}
		})
	}
	if (modelName.value == "second") {
		router.push({
			path: "/analysisAssess/indexModel",
			query: {
				taskId: route.query.taskId,
				modelType: "3",
				taskDistrict: route.query.taskDistrict,
				metaTitle: modelLabel.value
			}
		})
	}
	if (modelName.value == "third") {
		router.push({
			path: "/analysisAssess/logisti",
			query: {
				taskId: route.query.taskId,
				modelType: "4",
				taskDistrict: route.query.taskDistrict,
				metaTitle: modelLabel.value
			}
		})
	}
	if (modelName.value == "fourth") {
		//黄土高原			
		router.push({
			path: "/analysisAssess/loessPlateau",
			query: {
				taskId: route.query.taskId,
				modelType: "2",
				taskDistrict: route.query.taskDistrict,
				metaTitle: modelLabel.value
			}
		})
	}
	if (modelName.value == "fifth") {
		//newMark
		router.push({
			path: "/analysisAssess/newMark",
			query: {
				taskId: route.query.taskId,
				modelType: "5",
				taskDistrict: route.query.taskDistrict,
				metaTitle: modelLabel.value
			}
		})
	}
	selectDetail.value = false;
}
//更换模型
function replaceModel() {
	if (form.value.status == "2") {
		selectDetail.value = true;
		return
	}
	proxy.$confirm('更换模型前，请选择是否将当前结果存为中间结果？选择“否”当前结果将被覆盖。', '系统提示',
		{ confirmButtonText: '是', cancelButtonText: '否', type: 'warning' }).then(function () {

		}).then(() => {
			saveAsMiddleResult({ "dtmId": form.value.dtmId, "taskId": route.query.taskId, "tab": "1" }).then(response => {
				//proxy.$modal.msgSuccess(response.message);
				selectDetail.value = true;
			});
		}).catch(() => {
			delDzzhTaskModel({ "dtmId": form.value.dtmId }).then(response => {
				selectDetail.value = true;
			});
		});
}
// 更多数据
function handleMore(row) {
	proxy.$refs['tableRef'].toggleRowExpansion(row);
}
/** 搜索按钮操作 */
let dataVersionType = ref('')
function handleQuerySel() {
	queryParamsSel.value.page = 1;
	if (showPage.value == "pd") {
		getSlopeDataList();
	} else {
		getDataVersionList();
	}
}
/** 重置按钮操作 */
function resetQuerySel() {
	proxy.resetForm("querySelRef");
	handleQuerySel();
}
//获取坡度数据版本
function getSlopeDataList(dataType) {
	loadingSel.value = true;
	var province = route.query.taskDistrict?.split("-")[0];
	getSlopeData({
		...queryParamsSel.value,
		"dataTypeLevel3": dataType || dataVersionType.value,
		"distinct": province
	}).then(response => {
		loadingSel.value = false;
		slopeDataList.value = response.data.rows;
		totalSel.value = response.data.total;
	});
}
//获取数据版本
function getDataVersionList(type) {
	loadingSel.value = true;
	var province = route.query.taskDistrict?.split("-")[0];
	getParam1Version({
		"vo": { ...queryParamsSel.value, "province": province },
		"tab": type || dataVersionType.value
	}).then(response => {
		loadingSel.value = false;
		slopeDataList.value = response.data.list;
		totalSel.value = response.data.total;
	});
}
//坡度数据选择
function selectSlope() {
	openSlope.value = true;
	dataVersionType.value = 'dxdmpd'
	getSlopeDataList("dxdmpd");
	showPage.value = "pd";
}
//地层岩性选择
function selectLithology() {
	openSlope.value = true;
	dataVersionType.value = '3'
	getDataVersionList("3");
	showPage.value = "";
}
//地貌数据选择
function selectLandforms() {
	openSlope.value = true;
	dataVersionType.value = 'dm'
	getSlopeDataList("dm");
	showPage.value = "pd";
}
//天然密度数据选择
function selectNatDenVersion() {
	openSlope.value = true;
	dataVersionType.value = 'trmd'
	getSlopeDataList("trmd");
	showPage.value = "pd";
}
//地震动数据选择
function selectPgaA1() {
	openSlope.value = true;
	dataVersionType.value = '5'
	getDataVersionList("5");
	showPage.value = "";
}
function selectPgaA2() {
	openSlope.value = true;
	dataVersionType.value = '6'
	getDataVersionList("6");
	showPage.value = "";
}
function selectPgaA3() {
	openSlope.value = true;
	dataVersionType.value = '7'
	getDataVersionList("7");
	showPage.value = "";
}
// 选择版本
function handleSelect(row) {
	if (row.dataTypeLevel3Code == "dcyx1") {
		isLithologyShowButton.value = false;
		lithologyVersion.value = row.versionCode;
	} else if (row.dataTypeLevel3 == "dm") {
		isLandformsShowButton.value = false;
		landformsVersion.value = row.versionCode;
	} else if (row.dataTypeLevel3 == "trmd") {
		isNatDenShowButton.value = false;
		natDenVersion.value = row.versionCode;
	} else if (row.dataTypeLevel3Code == "pga002") {
		isA1ShowButton.value = false;
		a1Version.value = row.versionCode;
	} else if (row.dataTypeLevel3Code == "pga010") {
		isA2ShowButton.value = false;
		a2Version.value = row.versionCode;
	} else if (row.dataTypeLevel3Code == "pga063") {
		isA3ShowButton.value = false;
		a3Version.value = row.versionCode;
	} else if (row.dataTypeLevel3 == "dxdmpd") {
		isSlopeShowButton.value = false;
		slopeVersion.value = row.versionCode;
	}
	openSlope.value = false;
}
//切换标签页
function handleClickModel(tab, event) {
	modelName.value = tab.props.name;
	modelLabel.value = tab.props.label;
}

onMounted(() => {
	getTaskModel()
})
</script>
<style scoped lang="scss">
@import '@/assets/styles/variables.module.scss';

.tab-title {
	font-size: 16px;
	font-weight: bold;
	border-left: 4px solid #0D9AFF;
	font-family: PingFangSC-Medium;
	padding-left: 10px;
	margin: 10px 0 10px;
}

.line {
	text-align: center;
}

table td {
	border: 1px solid #c6c6c6;
	padding: 5px;
}

form {
	width: 75%;
	margin: 0 auto;
}

:deep(.el-space) {
	.el-space__item {
		width: 100%;
	}
}

.success-btn-icon {
	.el-icon {
		color: $--color-success;
	}
}

.success-btn-icon.el-button--primary.is-plain {
	background-color: #ecf5ff !important;
	color: var(--el-color-primary) !important;
}
</style>
<style>.tool-tip {
	max-width: 400px;
}
</style>